#pragma once

#include "Root.h"
#include "TextureFactory.h"

VAMPIRE_NAMESPACE_BEGIN

class _VampireExport HDR : public MemoryAlloc
		
{
public:
	SINGLETON(HDR)

	BOOL             createResources();

private:
	HDR(void);

	HRESULT          checkFormat(D3DFORMAT format, DWORD usage);

	BOOL             findBestHDRFormat();

	BOOL             findBestLuminanceFormat();

	DWORD            mBestFormat;

	DWORD            mBestLuminanceFormat;

	D3DFORMAT        mAdapterFormat;

	LPDIRECT3D9      mpD3D;

	Texture*         mpBrightPassTex;

	Texture*         mpDownSampledTex;
};

VAMPIRE_NAMESPACE_END